<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--  再熟悉一遍ajax（我本来就不会）  -->
<script type="javascript">
    //1.创建XMLHttpRequest 核心//通过IE来区分两种方法
    var xmlhttp;
    if (window.XMLHttpRequest){
        xmlhttp = new XMLHttpRequest();
    }else {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //2.发送Ajax请求
    xmlhttp.open("GET","/NewsByAjax/news_list",true);
    xmlhttp.send();
    //3.处理服务器响应
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
            var text = xmlhttp.responseText;
            console.log(text);
            var json = JSON.parse(text);
            console.log(json);
            alert(json);
        }
    }
</script>
</body>
</html>